package com.weiyuwqj.server.mapper;

import com.weiyuwqj.api.model.BusAssetRepay;
import com.weiyuwqj.api.util.converter.IntegerConverter;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;
@Repository
public interface BusAssetRepayMapper extends Mapper<BusAssetRepay> {

    List<BusAssetRepay> listByPlanIdAndCurrentPeriod(@Param(value = "packagePlanId")Integer packagePlanId,
                                                     @Param(value = "periods")Integer periods);

    //更新待还状态
    int updateRepayStatus(BusAssetRepay repay);

    //根据id和状态更新最新状态
    int updateRepayByStatusAndId(Map param);

    List<BusAssetRepay> getAssetRepayListsByItemIdAndCurrentPeriod(Integer itemId);
}